package org.fujene.structure;

public class ExtendResult {
	ContentInfo contentInfo;
	ExtendQueue[] results;
	
	public ExtendResult(ContentInfo contentInfo) {
		this.contentInfo = contentInfo;
	}
	
	public void setResult(ExtendQueue[] results){
		this.results = results;
	}
	
	public String getStrByIndex(int queueIndex, boolean isContent, int contentIndex){
		if(isContent)
			return this.results[queueIndex].contents[contentIndex];
		else
			return this.results[queueIndex].supplements[contentIndex];
	}
	
	public ExtendQueue getQueue(int index){
		return this.results[index];
	}
	
	public ExtendQueue[] getQueues(){
		return this.results;
	}
	
	public int getLength(){
		if(this.results != null)
			return this.results.length;
		else
			return 0;
	}
	
	public void clearResult(){
		this.results = null;
	}
}
